vNUMA: validate XEN_DOMCTL_setvnumainfo input
authorJan Beulich <jbeulich@suse.com>
Wed, 4 Mar 2015 09:01:41 +0000 (10:01 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 4 Mar 2015 09:01:41 +0000 (10:01 +0100)
commit519205d2ade90f8402512521fab564a0a015d03c
tree160c9b2dad7c4131b1344665ff574108baeeca9d
parent375a09cffacff820e025c65d0cdfbd403ecb30cc
vNUMA: validate XEN_DOMCTL_setvnumainfo input

As we get ready to use the information set for a domain here we should
make sure it is actually valid: Both vNode and pNode numbers should be
in range. Do a little bit of other cleanup so the code ends up looking
reasonably consistent in style.

Along with this goes that we don't need an array of unsigned int to
store the pNode number - a nodeid_t one (a quarter the size) suffices.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@cigtrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/domctl.c
xen/include/xen/domain.h